<?php $this->headTitle(__('Banks')); ?>
<div id="maincontent">
	<?php echo $this->searchForm(__('Search Bank')); ?>
	<table width="100%">
		<thead>
			<th><?php echo $this->sortLink(__('Name'),'name') ?></th>
			<th><?php echo $this->sortLink(__('Address'),'address') ?></th>
            <th><?php echo $this->sortLink(__('Phone'),'phone') ?></th>
            <th class="action"><?php echo __('Action'); ?></th>
		</thead>
		<tbody>
			<?php if($this->banks): ?>
				<?php foreach($this->banks as $key => $bank): ?>
					<tr class="<?php echo ($key % 2 == 0)?'even':'odd'; ?>">
						<td><?php echo $bank['name']; ?></td>
						<td><?php echo $bank['address'] ?></td>
                        <td><?php echo $bank['phone'] ?></td>
                        <td><a class="edit" href="<?php echo $this->baseUrl('admin/bank/edit/id/'.Custom_General::encode($bank['id'])); ?><?php echo ($this->page)?"/page/".$this->page:''; ?>">&nbsp;</a>
                            <a class="delete"
                               del:url="<?php echo $this->siteURL.'/admin/bank/delete/id/'.Custom_General::encode($bank['id']); ?><?php echo ($this->page)?"/page/".$this->page:''; ?>">&nbsp;
                            </a
                            <a class="show" href="<?php echo $this->baseUrl('admin/bank/show/id/'.Custom_General::encode($bank['id'])); ?>">&nbsp;</a>
						</td>
					</tr>
				<?php endforeach; ?>
			<?php else: ?>
					<tr><td colspan="6" align="center"><?php echo __('Bank not found'); ?></td></tr>
			<?php endif; ?>
		</tbody>
	</table>
	<?php echo $this->pagination();?>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$('.delete').click(function(){
		setDeleteDialog($(this).attr('del:url'), "Are you sure, you want to delete this bank ?");
	});

});
</script>